package com.cg.service.impl;

import org.apache.rocketmq.spring.annotation.MessageModel;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * @ClassName SendMessageImpl
 * @Description TODO
 * @Author CG
 * @Date 2024/1/12 17:25
 **/
@Component
@RocketMQMessageListener(consumerGroup = "orderConsumerGroup",topic = "orderTopic",messageModel = MessageModel.BROADCASTING)
public class SendMessageImpl implements RocketMQListener<String> {

    private final Logger logger = LoggerFactory.getLogger(SendMessageImpl.class);

    @Override
    public void onMessage(String s) {
        logger.info("发送短信到患者："+s);
    }
}
